package com.zhuangjie.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhuangjie.user.entity.AddressBook;
import com.zhuangjie.user.vo.AddressBookVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 收货地址表 Mapper 接口
 * </p>
 *
 * @author zhuangjie
 * @since 2023-10-15
 */
public interface AddressBookMapper extends BaseMapper<AddressBook> {

    List<AddressBookVO> preferredAddressList(@Param("userId") Long userId, @Param("longitude") Double longitude, @Param("latitude") Double latitude, @Param("reasonableDistance") Double reasonableDistance);

    AddressBookVO preferredAddress(@Param("userId") Long userId, @Param("longitude") Double longitude, @Param("latitude") Double latitude, @Param("reasonableDistance") Double reasonableDistance);

}
